<%--
  Created by IntelliJ IDEA.
  User: CHonghao
  Date: 2021/1/4
  Time: 16:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>费用调整日志</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/themes/icon.css">
</head>


</head>

<body style="margin: 1px; font-family: microsoft yahei">
<table id="dg" title="费用调整日志" class="easyui-datagrid"
       url="${pageContext.request.contextPath}/RoomLogServlet?action=query"
       toolbar="#tb" pagination="true"
       rownumbers="true" fitColumns="true">
    <thead>
    <tr>
        <th field="cb" checkbox="true" align="center"></th>
        <th field="rno" width="50" align="center">房间号</th>
        <th field="oldcost" width="50" align="center">原费用</th>
        <th field="newcost" width="50" align="center">修改后费用</th>
        <th field="updatetime" width="50" align="center">修改时间</th>
        <th field="username" width="50" align="center">修改用户名</th>
    </tr>
    </thead>
</table>
<div id="tb">
    <div>
        <span>&nbsp;楼层号：&nbsp;</span>
        <select id="fno" class="easyui-combobox" data-options="panelHeight:'auto'" style="width:150px;">
            <option value="">全部</option>
            <option value="1">1</option>
            <option value="2">2</option>
            <option value="3">3</option>
        </select>
        <span>&nbsp;房间号：&nbsp;</span>
        <input type="text"  class="easyui-textbox" id="rno" style="width:150px;">
        <a href="javascript:searchLog()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
        <a href="javascript:reload()" class="easyui-linkbutton" iconCls="icon-reload" plain="true">刷新</a>
    </div>
</div>

<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">

    function reload() {
        $("#dg").datagrid("reload");
    }

    /*根据楼层号和房间号查询房间费用调整日志*/
    function searchLog() {
        $.post("${pageContext.request.contextPath}/RoomLogServlet?action=searchbyfr", {
            fno:$('#fno').combobox('getValue'),
            rno:$('#rno').val()
        }, function(data, states) {
            $("#dg").datagrid("loadData", data);
        },"json");
    }
</script>
</body>
</html>
